/**
 * @author Tim.zhang@locisoftware.com
   @date   2010-3-3
 */
package com.school.lab.service.impl;

import java.util.List;

import com.school.lab.dao.MoudelDao;
import com.school.lab.domain.Moudel;
import com.school.lab.service.MoudelService;

public class MoudelServiceImpl implements MoudelService {
	
	private MoudelDao moudelDao;

	public void setMoudelDao(MoudelDao moudelDao) {
		this.moudelDao = moudelDao;
	}

	
	public void delMoudel(Long id) {
		moudelDao.delete(id);
		
	}

	
	public Moudel getMoudelById(Long id) {
		
		return moudelDao.get(id);
	}

	
	public void saveMoudel(Moudel moudel) {
		moudelDao.save(moudel);
		
	}

	
	public void updateMoudel(Moudel moudel) {
		moudelDao.saveOrUpdate(moudel);
		
	}

	
	public List<Moudel> findMoudels() {
		return moudelDao.loadAll();
	}


	
}
